load("//bzl:cpp_library.bzl", "cpp_library")

package(default_visibility = ["//visibility:public"])

cpp_library(
    name = "named_thread_factory",
    hdrs = ["NamedThreadFactory.h"],
    deps = [
        ":thread_factory",
        "//folly:conv",
        "//folly:range",
        "//folly/system:thread_name",
    ],
)

cpp_library(
    name = "priority_thread_factory",
    srcs = ["PriorityThreadFactory.cpp"],
    hdrs = ["PriorityThreadFactory.h"],
    deps = [
        ":init_thread_factory",
        "//folly:string",
        "//folly/portability:sys_resource",
        "//folly/portability:sys_time",
        "//folly/system:thread_name",
        "@glog",
    ],
)

cpp_library(
    name = "init_thread_factory",
    hdrs = ["InitThreadFactory.h"],
    deps = [
        ":thread_factory",
        "//folly:scope_guard",
    ],
)

cpp_library(
    name = "thread_factory",
    hdrs = ["ThreadFactory.h"],
    deps = [
        "//folly:executor",
    ],
)
